<?php
/**

 * User:ayou chow
 * Date: 2020-02-12
 * Time: 14:50
 */

namespace app\common\model;


use think\Model;

class TennisMatchModel extends Model
{
    public function matchevent(){
        return $this->hasOne('TennisMatcheventModel','id','competition_id');
    }

    public function hometeam(){
        return $this->hasOne('TennisTeamModel','id','home_id');
    }

    public function awayteam(){
        return $this->hasOne('TennisTeamModel','id','away_id');
    }

    public function rec(){
        return $this->hasOne('TennisMatchRecModel','matchid','id');
    }

    public function url(){
        return $this->hasOne('MatchesModel','match_id','id');
    }

    public function live(){
        return $this->hasOne(MatchesModel::class,'match_id','id');
    }
}